package com.atguigu.szdz.dcsyl.service.impl;

import com.atguigu.szdz.dcsyl.service.KxylService;
import com.atguigu.szdz.dcsyl.utils.MapperUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collections;
import java.util.List;
import java.util.Map;

@Service("kxylService")
public class KxylServiceImpl extends BaseServiceImpl implements KxylService {

    @Autowired
    MapperUtils mapperUtils;

    @Transactional(rollbackFor = Exception.class)
    public void aaa() {
        System.out.println("kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
        queryBySql("INSERT INTO sys_menu (label, path) VALUES ('aaa', 'bbb')");
        queryBySql("INSERT INTO sys_menu (label, path) VALUES ('ccc', 'ddd')");
    }

    @Override
    public List<Map<String, Object>> getKxylcharsList(String sql) {
        return mapperUtils.queryBySql(sql);
    }


}
